<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>learn react</title>
    <script src="js/react.js"></script>
    <script src="js/react-dom.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script type="text/babel">
    /*
      定义一个HelloMessage的组件
     */
      var HelloMessage = React.createClass({
        render: function() {
          return <h1>hello {this.props.name}</h1>
        }
      })
      ReactDOM.render(
        <HelloMessage name='Lee' />,
        document.getElementById('example')
      )
    </script>
  </body>
</html>
